The DeleteKey method deletes a key and all its subkeys and named values from the registry.
Caution You should be particularly careful when deleting keys from the registry. Deleting critical registry keys and named values can render your machine unusable.
DeleteKey FullKeyname [,Flush]
This can be a key on either a local or a remote machine. Keys on a remote machine are specified by prefixing the key name with the machine name. For example:
\\RemoteMachine\HKLM\Software\MyProg
If Flush is set to TRUE, the method immediately writes the registry changes to the disk. Note that immediately flushing registry changes to the disk may reduce server performance.
If Flush is FALSE, the method does not immediately write the registry changes to the disk. They are instead written to the disk by the registry's lazy flusher or when the system shuts down.
The default is FALSE.
HKEY_CURRENT_USER\Software\MyCompany
and all its subkeys and named values.<% Set MyReg = Server.CreateObject("IISSample.Registry") MyReg.DeleteKey "HKEY_CURRENT_USER\Software\MyCompany" %>